package com.hsck.order.kds.setup.adapter

import android.view.View
import androidx.annotation.LayoutRes
import com.hsck.order.kds.base.common.BaseAdapter
import com.hsck.order.kds.base.common.BaseViewHolder
import kotlinx.android.synthetic.main.item_dyjgl.view.*

/**
 * 打印机管理-适配器
 */
class DyjglAdapter(@LayoutRes layoutId: Int) : BaseAdapter<String>(layoutId) {

    override fun onBindViewHolder(holder: BaseViewHolder, data: String) {

        if (data == "Add") {
            holder.itemView.lin_item_dyjgl_add.visibility = View.VISIBLE
            holder.itemView.lin_item_dyjgl.visibility = View.GONE
        } else {
            holder.itemView.lin_item_dyjgl_add.visibility = View.GONE
            holder.itemView.lin_item_dyjgl.visibility = View.VISIBLE

        }

    }
}